package gang.com.twoshopping.adapter;

import android.content.Context;

import java.util.List;

import gang.com.twoshopping.R;
import gang.com.twoshopping.bean.Category;

/**
 * Created by xiaogangzai on 2017/6/3.
 */
//注意这里只是传递一个泛型
public class CategoryAdapter extends BaseSimpleAdapter<Category> {
    public CategoryAdapter(Context context, List<Category> dates) {
        super(context, dates, R.layout.template_single_text);
    }

    @Override
    public void bindData(BaseViewHolder viewHolder, Category category) {
        viewHolder.getTextView(R.id.fragment_categoty_textView).setText(category.getName());
    }
}
